package com.troll.example.bigdata.hbase.controller;

import com.troll.example.bigdata.hbase.properties.HbaseConfigProperties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * HBase 操作接口
 * @Author Troll
 * @Date 2019-02-14 12:48
 */
@RestController
@RequestMapping(value="/troll/example/bigdata/hbase")
public class HbaseController {
    //日志
    Logger logger = LoggerFactory.getLogger(HbaseController.class);

    @Autowired
    HbaseConfigProperties hbaseConfigProperties;

    //读取hbase 配置
    @RequestMapping(value="/getHbaseConfigProperties")
    public String getHbaseConfigProperties(){
        return "hbaseConfigProperties:"+hbaseConfigProperties.getConfig().entrySet().toString();
    }

    //测试页
    @RequestMapping(value="/hello")
    public String hello(){
        return "hello,"+this.getClass().getSimpleName();
    }

}